﻿using System;
using System.ComponentModel;
using System.Windows.Forms;
using System.Windows.Forms.Design;

namespace ASmile.Win.Controls
{
    [ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.ToolStrip)]
    public class TollStripTimeSpan : ToolStripControlHost
    {
        public TollStripTimeSpan()
            : base(new EditTime())
        { }

        [Description("时间控件")]
        public EditTime EditControl
        {
            get
            {
                return Control as EditTime;
            }
        }

        /// <summary>
        /// 获取或设置分配给控件的日期/时间值。
        /// </summary>
        [Browsable(true)]
        [Description("获取或设置分配给控件的日期/时间值。")]
        public TimeSpan Value
        {
            set { EditControl.Value = value; }
            get { return EditControl.Value; }
        }
    }
}
